home *** CD-ROM | disk | FTP | other *** search
/ CD BIT 75 / CD BIT 75.iso / Software / ooo / f_0020 / sbasic.jar / text / sbasic / common / 01040000.xml < prev    next >
Encoding:
Extensible Markup Language  |  2003-08-01  |  15.2 KB  |  154 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <html><head><title>Event-Driven Macros</title><meta name="filename" content="text/sbasic/common/01040000"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
  3.  
  4.         table.Tabelle2{
  5.                 margin-left:0cm; margin-right:0.005cm;}
  6.         span.Tabelle2A{
  7.                 width:5.046cm;}
  8.         span.Tabelle2B{
  9.                 width:12.949cm;}
  10.         td.Tabelle2A1{
  11.                 }
  12.         td.Tabelle2B1{
  13.                 }
  14.         td.Tabelle2A2{
  15.                 }
  16.         td.Tabelle2B2{
  17.                 }
  18.         td.Tabelle2A17{
  19.                 }
  20.         td.Tabelle2B17{
  21.                 }
  22.         p.P1{
  23.                 }
  24.         p.P2{
  25.                 }
  26.         p.P3{
  27.                 }
  28.         span.T1{
  29.                 font-weight:bold;}
  30.         </style></head><body>
  31.   
  32.   
  33.   <help:paragraphinfo state="E" xmlns:help="http://openoffice.org/2000/help"/><help:to-be-embedded Eid="weitere" xmlns:help="http://openoffice.org/2000/help">
  34.   <p class="Head1"><help:paragraphinfo state="U" number="1"/><help:link Id="66494">Event-Driven Macros</help:link></p>
  35.   <p class="Paragraph"><help:paragraphinfo state="U" number="2"/>This section describes how to assign Basic programs to program events.</p>
  36.   <help:paragraphinfo state="E"/></help:to-be-embedded>
  37.   <p class="Paragraph"><help:paragraphinfo state="U" number="4" xmlns:help="http://openoffice.org/2000/help"/>You can automatically executing a macro when a specified software event occurs by assigning the desired macro to the event. The following table provides an overview of program events and at what point an assigned macro is executed.</p>
  38.   <table border="1" bordercolor="#000000" cellpadding="2" cellspacing="0" page-break-inside="page-break-inside:avoid"><tr class=""><th class="Tabelle2A1" style="text-align:left;"><span class="Tabelle2A">
  39.       <p class="TableHead"><help:paragraphinfo state="U" number="5" xmlns:help="http://openoffice.org/2000/help"/>Event</p>
  40.      </span></th><th class="Tabelle2B1" style="text-align:left;"><span class="Tabelle2B">
  41.       <p class="TableHead"><help:paragraphinfo state="U" number="6" xmlns:help="http://openoffice.org/2000/help"/>An assigned macro is executed...</p>
  42.      </span></th></tr><tr class=""><td class="Tabelle2A2" style="text-align:left;"><span class="Tabelle2A">
  43.      <p class="TextInTable"><help:paragraphinfo state="U" number="7" xmlns:help="http://openoffice.org/2000/help"/>Program Start</p>
  44.     </span></td><td class="Tabelle2B2" style="text-align:left;"><span class="Tabelle2B">
  45.      <p class="TextInTable"><help:paragraphinfo state="U" number="8" xmlns:help="http://openoffice.org/2000/help"/>... after a <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> application is started.</p>
  46.     </span></td></tr><tr class=""><td class="Tabelle2A2" style="text-align:left;"><span class="Tabelle2A">
  47.      <p class="TextInTable"><help:paragraphinfo state="U" number="9" xmlns:help="http://openoffice.org/2000/help"/>Program End</p>
  48.     </span></td><td class="Tabelle2B2" style="text-align:left;"><span class="Tabelle2B">
  49.      <p class="TextInTable"><help:paragraphinfo state="U" number="10" xmlns:help="http://openoffice.org/2000/help"/>...before a <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> application is terminated.</p>
  50.     </span></td></tr><tr class=""><td class="Tabelle2A2" style="text-align:left;"><span class="Tabelle2A">
  51.      <p class="TextInTable"><help:paragraphinfo state="U" number="11" xmlns:help="http://openoffice.org/2000/help"/>Create Document</p>
  52.     </span></td><td class="Tabelle2B2" style="text-align:left;"><span class="Tabelle2B">
  53.      <p class="TextInTable"><help:paragraphinfo state="U" number="12" xmlns:help="http://openoffice.org/2000/help"/>...after a new document is created with <span class="T1">File - New</span> or with the <span class="T1">New</span> icon.</p>
  54.     </span></td></tr><tr class=""><td class="Tabelle2A2" style="text-align:left;"><span class="Tabelle2A">
  55.      <p class="TextInTable"><help:paragraphinfo state="U" number="13" xmlns:help="http://openoffice.org/2000/help"/>Open Document</p>
  56.     </span></td><td class="Tabelle2B2" style="text-align:left;"><span class="Tabelle2B">
  57.      <p class="TextInTable"><help:paragraphinfo state="U" number="14" xmlns:help="http://openoffice.org/2000/help"/>...after a document is opened with <span class="T1">File - Open</span> or with the <span class="T1">Open</span> icon.</p>
  58.     </span></td></tr><tr class=""><td class="Tabelle2A2" style="text-align:left;"><span class="Tabelle2A">
  59.      <p class="TextInTable"><help:paragraphinfo state="U" number="15" xmlns:help="http://openoffice.org/2000/help"/>Save Document As</p>
  60.     </span></td><td class="Tabelle2B2" style="text-align:left;"><span class="Tabelle2B">
  61.      <p class="TextInTable"><help:paragraphinfo state="U" number="16" xmlns:help="http://openoffice.org/2000/help"/>...before a document is saved under a specified name (with <span class="T1">File - Save As</span>, or with <span class="T1">File - Save</span> or the <span class="T1">Save</span> icon, if a document name has not yet been specified).</p>
  62.     </span></td></tr><tr class=""><td class="Tabelle2A2" style="text-align:left;"><span class="Tabelle2A">
  63.      <p class="TextInTable"><help:paragraphinfo state="U" number="43" xmlns:help="http://openoffice.org/2000/help"/>Document has been saved as</p>
  64.     </span></td><td class="Tabelle2B2" style="text-align:left;"><span class="Tabelle2B">
  65.      <p class="TextInTable"><help:paragraphinfo state="U" number="44" xmlns:help="http://openoffice.org/2000/help"/>... after a document was saved under a specified name (with <span class="T1">File - Save As</span>, or with <span class="T1">File - Save</span> or with the <span class="T1">Save</span> icon, if a document name has not yet been specified).</p>
  66.     </span></td></tr><tr class=""><td class="Tabelle2A2" style="text-align:left;"><span class="Tabelle2A">
  67.      <p class="TextInTable"><help:paragraphinfo state="U" number="17" xmlns:help="http://openoffice.org/2000/help"/>Save Document</p>
  68.     </span></td><td class="Tabelle2B2" style="text-align:left;"><span class="Tabelle2B">
  69.      <p class="TextInTable"><help:paragraphinfo state="U" number="18" xmlns:help="http://openoffice.org/2000/help"/>...before a document is saved with <span class="T1">File - Save</span> or the <span class="T1">Save</span> icon, provided that a document name has already been specified.</p>
  70.     </span></td></tr><tr class=""><td class="Tabelle2A2" style="text-align:left;"><span class="Tabelle2A">
  71.      <p class="TextInTable"><help:paragraphinfo state="U" number="45" xmlns:help="http://openoffice.org/2000/help"/>Document has been saved</p>
  72.     </span></td><td class="Tabelle2B2" style="text-align:left;"><span class="Tabelle2B">
  73.      <p class="TextInTable"><help:paragraphinfo state="U" number="46" xmlns:help="http://openoffice.org/2000/help"/>...after a document is saved with <span class="T1">File - Save</span> or the <span class="T1">Save</span> icon, provided that a document name has already been specified.</p>
  74.     </span></td></tr><tr class=""><td class="Tabelle2A2" style="text-align:left;"><span class="Tabelle2A">
  75.      <p class="TextInTable"><help:paragraphinfo state="U" number="19" xmlns:help="http://openoffice.org/2000/help"/>Close Document</p>
  76.     </span></td><td class="Tabelle2B2" style="text-align:left;"><span class="Tabelle2B">
  77.      <p class="TextInTable"><help:paragraphinfo state="U" number="20" xmlns:help="http://openoffice.org/2000/help"/>...before a document is closed.</p>
  78.     </span></td></tr><tr class=""><td class="Tabelle2A2" style="text-align:left;"><span class="Tabelle2A">
  79.      <p class="TextInTable"><help:paragraphinfo state="U" number="47" xmlns:help="http://openoffice.org/2000/help"/>Document is being closed</p>
  80.     </span></td><td class="Tabelle2B2" style="text-align:left;"><span class="Tabelle2B">
  81.      <p class="TextInTable"><help:paragraphinfo state="U" number="48" xmlns:help="http://openoffice.org/2000/help"/>...after a document was closed. Note that the "Save Document" event may also occur when the document is saved before closing.</p>
  82.     </span></td></tr><tr class=""><td class="Tabelle2A2" style="text-align:left;"><span class="Tabelle2A">
  83.      <p class="TextInTable"><help:paragraphinfo state="U" number="21" xmlns:help="http://openoffice.org/2000/help"/>Activate Document</p>
  84.     </span></td><td class="Tabelle2B2" style="text-align:left;"><span class="Tabelle2B">
  85.      <p class="TextInTable"><help:paragraphinfo state="U" number="22" xmlns:help="http://openoffice.org/2000/help"/>...after a document is brought to the foreground.</p>
  86.     </span></td></tr><tr class=""><td class="Tabelle2A2" style="text-align:left;"><span class="Tabelle2A">
  87.      <p class="TextInTable"><help:paragraphinfo state="U" number="23" xmlns:help="http://openoffice.org/2000/help"/>Deactivate Document</p>
  88.     </span></td><td class="Tabelle2B2" style="text-align:left;"><span class="Tabelle2B">
  89.      <p class="TextInTable"><help:paragraphinfo state="U" number="24" xmlns:help="http://openoffice.org/2000/help"/>...after another document is brought to the foreground.</p>
  90.     </span></td></tr><tr class=""><td class="Tabelle2A2" style="text-align:left;"><span class="Tabelle2A">
  91.      <p class="TextInTable"><help:paragraphinfo state="U" number="25" xmlns:help="http://openoffice.org/2000/help"/>Print Document</p>
  92.     </span></td><td class="Tabelle2B2" style="text-align:left;"><span class="Tabelle2B">
  93.      <p class="TextInTable"><help:paragraphinfo state="U" number="26" xmlns:help="http://openoffice.org/2000/help"/>...after the <span class="T1">Print</span> dialog is closed, but before the actual print process begins.</p>
  94.     </span></td></tr><tr class=""><td class="Tabelle2A2" style="text-align:left;"><span class="Tabelle2A">
  95.      <p class="TextInTable"><help:paragraphinfo state="U" number="49" xmlns:help="http://openoffice.org/2000/help"/>JavaScript run-time error</p>
  96.     </span></td><td class="Tabelle2B2" style="text-align:left;"><span class="Tabelle2B">
  97.      <p class="TextInTable"><help:paragraphinfo state="U" number="50" xmlns:help="http://openoffice.org/2000/help"/>...when a JavaScript run-time error occurs.</p>
  98.     </span></td></tr><tr class=""><td class="Tabelle2A2" style="text-align:left;"><span class="Tabelle2A">
  99.      <p class="TextInTable"><help:paragraphinfo state="U" number="27" xmlns:help="http://openoffice.org/2000/help"/>Print Mail Merge</p>
  100.     </span></td><td class="Tabelle2B2" style="text-align:left;"><span class="Tabelle2B">
  101.      <p class="TextInTable"><help:paragraphinfo state="U" number="28" xmlns:help="http://openoffice.org/2000/help"/>...after the <span class="T1">Print</span> dialog is closed, but before the actual print process begins. This event occurs for each copy printed.</p>
  102.     </span></td></tr><tr class=""><td class="Tabelle2A17" style="text-align:left;"><span class="Tabelle2A">
  103.      <p class="TextInTable"><help:paragraphinfo state="U" number="51" xmlns:help="http://openoffice.org/2000/help"/>Change of the page count</p>
  104.     </span></td><td class="Tabelle2B17" style="text-align:left;"><span class="Tabelle2B">
  105.      <p class="TextInTable"><help:paragraphinfo state="U" number="52" xmlns:help="http://openoffice.org/2000/help"/>...when the page count changes.</p>
  106.     </span></td></tr><tr class=""><td class="Tabelle2A17" style="text-align:left;"><span class="Tabelle2A">
  107.      <p class="TextInTable"><help:paragraphinfo state="U" number="53" xmlns:help="http://openoffice.org/2000/help"/>Message received</p>
  108.     </span></td><td class="Tabelle2B17" style="text-align:left;"><span class="Tabelle2B">
  109.      <p class="TextInTable"><help:paragraphinfo state="U" number="54" xmlns:help="http://openoffice.org/2000/help"/>...if a message was received.</p>
  110.     </span></td></tr></table>
  111.   <help:paragraphinfo state="E" xmlns:help="http://openoffice.org/2000/help"/> 
  112.   <p class="Head2"><help:paragraphinfo state="U" number="30" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="macros; assign to events" tag="kw66494_1" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="events; assign to macros" tag="kw66494_3" xmlns:help="http://openoffice.org/2000/help"/>Assigning a Macro to an Event</p>
  113.   <ol class="L1">
  114.    <li class="">
  115.     <p class="P2"><help:paragraphinfo state="U" number="31" xmlns:help="http://openoffice.org/2000/help"/>Choose <span class="T1">Tools - Configure</span> and click the <span class="T1">Events</span> tab.</p>
  116.    </li>
  117.    <li class="">
  118.     <p class="P2"><help:paragraphinfo state="U" number="55" xmlns:help="http://openoffice.org/2000/help"/>Select whether you want the assignment to be globally valid or just valid in the current document by selecting the <span class="T1">StarOffice</span> or <span class="T1">Document</span> option.</p>
  119.    </li>
  120.    <li class="">
  121.     <p class="P2"><help:paragraphinfo state="U" number="32" xmlns:help="http://openoffice.org/2000/help"/>Select the event from the <span class="T1">Event</span> list.</p>
  122.    </li>
  123.    <li class="">
  124.     <p class="P2"><help:paragraphinfo state="U" number="33" xmlns:help="http://openoffice.org/2000/help"/>Select the module containing the macro to be assigned to the selected event from the <span class="T1">Macros</span> list. The list contains a hierarchical list of modules, libaries, files, and templates.</p>
  125.    </li>
  126.    <li class="">
  127.     <p class="P2"><help:paragraphinfo state="U" number="34" xmlns:help="http://openoffice.org/2000/help"/>Select the macro to be assigned from the right list.</p>
  128.    </li>
  129.    <li class="">
  130.     <p class="P2"><help:paragraphinfo state="U" number="35" xmlns:help="http://openoffice.org/2000/help"/>Click <span class="T1">Assign</span>.</p>
  131.    </li>
  132.    <li class="">
  133.     <p class="P2"><help:paragraphinfo state="U" number="56" xmlns:help="http://openoffice.org/2000/help"/>Click <span class="T1">OK</span> to close the dialog.</p>
  134.    </li>
  135.   </ol>
  136.   <p class="Head2"><help:paragraphinfo state="U" number="36" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="events; delete macro assignment" tag="kw66494_2" xmlns:help="http://openoffice.org/2000/help"/>Removing the Assignment of a Macro to an Event</p>
  137.   <ol class="L2">
  138.    <li class="">
  139.     <p class="P3"><help:paragraphinfo state="U" number="57" xmlns:help="http://openoffice.org/2000/help"/>Choose <span class="T1">Tools - Configure</span> and click the <span class="T1">Events</span> tab.</p>
  140.    </li>
  141.    <li class="">
  142.     <p class="P3"><help:paragraphinfo state="U" number="58" xmlns:help="http://openoffice.org/2000/help"/>Select whether you want to remove a gobal assignment or an assignment that is just valid in the current document by selecting the <span class="T1">StarOffice</span> or <span class="T1">Document</span> option.</p>
  143.    </li>
  144.    <li class="">
  145.     <p class="P3"><help:paragraphinfo state="U" number="59" xmlns:help="http://openoffice.org/2000/help"/>Select the event that contains the assignment to be removed from the <span class="T1">Event</span> list.</p>
  146.    </li>
  147.    <li class="">
  148.     <p class="P3"><help:paragraphinfo state="U" number="37" xmlns:help="http://openoffice.org/2000/help"/>Click <span class="T1">Remove</span>.</p>
  149.    </li>
  150.    <li class="">
  151.     <p class="P3"><help:paragraphinfo state="U" number="60" xmlns:help="http://openoffice.org/2000/help"/>Click <span class="T1">OK</span> to close the dialog.</p>
  152.    </li>
  153.   </ol>
  154.  </body></html>